<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./css/5.Product details.css">
</head>

<body>
    <header>

    </header>

    <!-- 详情页 -->
    <div class="carousel">
        <ul id="carousel">

            <li class="active">
                <a href="">
                    <!-- <img src="./images/67.jpg.jpg" alt=""> -->
                </a>
            </li>
            <li>
                <a href="">
                    <!-- <img src="./images/68.jpg.jpg" alt=""> -->
                </a>
            </li>
            <li>
                <a href="">
                    <!-- <img src="./images/69.jpg.jpg" alt=""> -->
                </a>
            </li>
            <li>
                <a href="">
                    <!-- <img src="./images/70.jpg.jpg" alt=""> -->
                </a>
            </li>

            <li>
                <a href="">
                    <!-- <img src="./images/71.jpg.jpg" alt=""> -->
                </a>
            </li>
        </ul>
        <ol>
            <li class="active"></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
        </ol>
        <span class="leftBtn">&lt;</span>
        <span class="rightBtn">&gt;</span>
    </div>
    <h1 class="titlexq">家庭影院</h1>
    <div class="jiatingyingyuanxq">
         <ul class="shop-list">
             <!-- <li><a href="#">
                    <img src="./images/72.jpg" alt="">
                    <h4 class="titletextxq">坚果O1 PRO</h4>
                    <p class="protextxq">坚果O1 PRO</p>
                    <span class="moneyxq">5949.00元</span>
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="./images/73.png" alt="">
                    <h4 class="titletextxq">【新品上市】坚果GS</h4>
                    <p class="protextxq">【新品上市】坚果GS</p>
                    <span class="moneyxq">2999.00元</span>
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="./images/74.png" alt="">
                    <h4 class="titletextxq">坚果G9</h4>
                    <p class="protextxq">简约派的精致生活影院</p>
                    <span class="moneyxq">2849.00元</span>
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="./images/75.png" alt="">
                    <h4 class="titletextxq">坚果O1</h4>
                    <p class="protextxq">坚果01 PRO</p>
                    <span class="moneyxq">3749.00元</span>
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="./images/76.png" alt="">
                    <h4 class="titletextxq">坚果J0</h4>
                    <p class="protextxq">重磅新品上市</p>
                    <span class="moneyxq">4949.00元</span>
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="./images/77.png" alt="">
                    <h4 class="titletextxq">坚果X3</h4>
                    <p class="protextxq">4K超清分辨率 纯净炫彩画质</p>
                    <span class="moneyxq">6299.00元</span>
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="./images/78.jpg" alt="">
                    <h4 class="titletextxq">坚果E9i</h4>
                    <p class="protextxq">入门级只智能高清微投</p>
                    <span class="moneyxq">3299.00元</span>
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="./images/79.png" alt="">
                    <h4 class="titletextxq">坚果V9C</h4>
                    <p class="protextxq">全新护眼模式 低蓝光 不伤眼</p>
                    <span class="moneyxq">5999.00元</span>
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="./images/80.jpg" alt="">
                    <h4 class="titletextxq">坚果V10</h4>
                    <p class="protextxq">超高清智能语音 定义高光新旗舰</p>
                    <span class="moneyxq">6999.00元</span>
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="./images/81.jpg" alt="">
                    <h4 class="titletextxq">坚果E20</h4>
                    <p class="protextxq">坚果E20</p>
                    <span class="moneyxq">4599.00元</span>
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="./images/82.jpg" alt="">
                    <h4 class="titletextxq">坚果O1 PRO</h4>
                    <p class="protextxq">坚果O1 PRO </p>
                    <span class="moneyxq">5949.00元</span>
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="./images/83.jpg" alt="">
                    <h4 class="titletextxq">坚果01 PRO</h4>
                    <p class="protextxq">坚果01 PRO</p>
                    <span class="moneyxq">5949.00元</span>
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="./images/84.jpg" alt="">
                    <h4 class="titletextxq">坚果01 PRO</h4>
                    <p class="protextxq">坚果01 PRO</p>
                    <span class="moneyxq">5949.00元</span>
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="./images/85.png" alt="">
                    <h4 class="titletextxq">坚果01 PRO</h4>
                    <p class="protextxq">坚果01 PRO</p>
                    <span class="moneyxq">5949.00元</span>
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="./images/86.jpg" alt="">
                    <h4 class="titletextxq">坚果01 PRO</h4>
                    <p class="protextxq">坚果01 PRO</p>
                    <span class="moneyxq">5949.00元</span>
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="./images/87.png" alt="">
                    <h4 class="titletextxq">坚果01 PRO</h4>
                    <p class="protextxq">坚果01 PRO</p>
                    <span class="moneyxq">5949.00元</span>
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="./images/88.png" alt="">
                    <h4 class="titletextxq">坚果01 PRO</h4>
                    <p class="protextxq">坚果01 PRO</p>
                    <span class="moneyxq">5949.00元</span>
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="./images/89.jpg" alt="">
                    <h4 class="titletextxq">坚果01 PRO</h4>
                    <p class="protextxq">坚果01 PRO</p>
                    <span class="moneyxq">5949.00元</span>
                </a>
            </li> 
            <span class="jiagexq"></span> -->
             
        </ul> 
    </div>
    <footer>

    </footer>
</body>

</html>
<script src="./js/jQuery.js"></script>
<script src="./js/5.Productdetails.js"></script>


<script>


    $.get("goods/getGoodsList.php", { "typeId": "001" }, function (data) {
        // console.log(data);
        let arr = JSON.parse(data);
        console.log(arr);
        let str = ``;

        arr.forEach((item,index) =>{
            console.log(item);
            str += `   <li class="${index}" >
                <a href="javascript:;"> 
                    <img src="${item.goodsImg}" alt="" id = "${item.goodsId}">
                    <h4 class="titletextxq">${item.goodsName}</h4>
                    <p class="protextxq">${item.goodsName}</p>
                    <span class="moneyxq">${item.goodsPrice}元</span>
                </a>
            </li> `
        })
        $(".shop-list").html(str)
    })
    $(".shop-list").on("click","img",function(e){
        if(e.target.tagName == "IMG"){
            let id = e.target.id;
            console.log(e.target.id)
            location.href = "6.magnifier.html?id="+id
        }
    })
    

</script>